<?php
	include("config.php");
	session_start();
	if($_SERVER["REQUEST_METHOD"]=="POST")
	{
		$username = addslashes($_POST['name']);
		$password = md5(addslashes($_POST['pass']));
		
		$sql ="SELECT * FROM Customer WHERE email='$username' AND password='$password'";
		$result = mysql_query($sql);
		$count = mysql_num_rows($result);		
		if($count==1)
		{
			session_register("myusername");
			$_SESSION['login_user'] = $username;
			$_SESSION['logged_in'] = true;
			header("location:contact.php");
		}
		else
			$error="Your email or password is invalid";
	}
?>
<!DOCTYPE html>
<html lang="en">
<?php include('../inc/head.php'); ?>
<body>	 
	 <?php
	 	if($_SESSION['logged_in']===true) 
			include('../inc/nav2.php');
		else	
	 		include('../inc/nav.php');	 
	 ?>     
	 <div class="container">
	 	<ul class="nav nav-tabs">
  			<li class="active">
    			<a href="contact.php">Contact Us</a>
  			</li>
  			<li><a href="about.php">About Us</a></li>  			
		</ul>
      <div class="row">      	
      	<center>
      		<div class="span10">
          		<u><h2>Contact Us</h2></u>          		
        	<div class="row">
        		<div class="span5">
        			<h4><b><u>Owner</u></b></h4>
        			<p>Email: <a href="mailto:elliotwasser@hotmail.com" target="blank">elliotwasser@hotmail.com</a></p>
        			<p>Phone: 973-983-7528</p>
        		</div>
        		<div class="span5">
        			<h4><b><u>Company</u></b></h4>
        			<p>Email: <a href="mailto:company@gmail.com" target="blank">company@gmail.com</a></p>
        			<p>Phone: 973-270-7438</p>
        		</div>        		
        	</div>
        	<div class="row">
        		<div class ="span10">
        			<h4><b><u>Address</u></b></h4>
        			<p>1 Hawk Drive</p>
        			<p>New Paltz, NY 12561</p> 
        			<p>USA</p>       			
        		</div>
        	</div>
        </div>
        </center>        
      </div>          
     <hr>
      <footer>
        <p>&copy; Company 2012</p>
      </footer>
    </div> <!-- /container -->
    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="../inc/bootstrap/js/jquery.js"></script>
    <script src="../inc/bootstrap/js/bootstrap-min.js"></script>
</body>
</html>